import instance from '@/utils/request'

export const getCartList = (params) => {
  return instance({
    url: '/cart/list',
    method: 'get',
    params,
  })
}
export const editCart = ( data) => {

  return instance({
    url: '/cart',
    method: 'put',
    data,
  })
}

export const deleteCart = (id) => {
  return instance({
    url: `/cart/${id}`,
    method: 'delete',
  })
}

export const addCart = (data) => {
  return instance({
    url: '/cart',
    method: 'post',
    data,
  })
}
